/*
 * Copyright (C) 2010-2011 Comcast Cable.  All Rights Reserved.
 */
package com.hercules.android.receiver.model.commands;

/**
 * <p>This is a subclass of XRECommand that represents a CONNECT XRE command. It defines some properties specific to
 * this command. According to XRE protocol specification, this command is used for confirmation of connection
 * establishing. It is a simple JavaBean (POJO) that provides getters and setters for all private attributes and
 * performs no argument validation in the setters.</p>
 *
 * <p><strong>Thread safety:</strong> This class is mutable and not thread safe.</p>
 *
 * @author saarixx, jmn
 * @version 1.0
 */
public class XREConnectCommand extends XRECommand {

    /**
     * <p>The command name associated with this class.</p>
     *
     * <p>Immutable string constant.</p>
     *
     * <p>Is used in getCommand().</p>
     */
    public static final String COMMAND_NAME = "CONNECT";

    /**
     * <p>The version of the XRE application.</p>
     *
     * <p>Can be any value.</p>
     *
     * <p>Has getter and setter.</p>
     */
    private String version;

    /**
     * <p>The unique identifier of the application instance.</p>
     *
     * <p>Can be any value.</p>
     *
     * <p>Has getter and setter.</p>
     */
    private String sessionGUID;

    /**
     * <p>The URL to the XML file that defines the key map for the receiver.</p>
     *
     * <p>Can be any value.</p>
     *
     * <p>Has getter and setter.</p>
     */
    private String keyMapURL;

    /**
     * <p>Creates new instance of {@link XREConnectCommand} class.</p>
     */
    public XREConnectCommand() {
        // empty constructor
    }

    /**
     * <p>Retrieves the name of this command.</p>
     *
     * @return the name of this command
     */
    public String getCommand() {
        return COMMAND_NAME;
    }

    /**
     * <p>Retrieves the version of the XRE application.</p>
     *
     * @return the version of the XRE application
     */
    public String getVersion() {
        return version;
    }

    /**
     * <p>Sets the version of the XRE application.</p>
     *
     * @param version the version of the XRE application
     */
    public void setVersion(String version) {
        this.version = version;
    }

    /**
     * <p>Retrieves the unique identifier of the application instance.</p>
     *
     * @return the unique identifier of the application instance
     */
    public String getSessionGUID() {
        return sessionGUID;
    }

    /**
     * <p>Sets the unique identifier of the application instance.</p>
     *
     * @param sessionGUID the unique identifier of the application instance
     */
    public void setSessionGUID(String sessionGUID) {
        this.sessionGUID = sessionGUID;
    }

    /**
     * <p>Retrieves the URL to the XML file that defines the key map for the receiver.</p>
     *
     * @return the URL to the XML file that defines the key map for the receiver
     */
    public String getKeyMapURL() {
        return keyMapURL;
    }

    /**
     * <p>Sets the URL to the XML file that defines the key map for the receiver.</p>
     *
     * @param keyMapURL the URL to the XML file that defines the key map for the receiver
     */
    public void setKeyMapURL(String keyMapURL) {
        this.keyMapURL = keyMapURL;
    }
}

